onQueryConditionsCompleted

open fun onQueryConditionsCompleted(response: Response)

Callback invoked when the QueryObservationsTask completes with weather data.

If the response and observation data are valid:

  • It determines the appropriate background weather condition image URL using the CONDITION_MAP and the icon code from the Aeris response. This image is then downloaded and set to the bg ImageView.
  • It constructs a URL to a remote text rendering service to generate an image of the current temperature. This URL includes the temperature value (adjusted for metric/imperial units), dimensions of the foreground ImageView, font, foreground color, and shadow effect. This temperature image is then downloaded and set to the fg ImageView.
If the response is invalid or contains no observation data, a warning is logged, and the view is not updated.

Parameters

response

The Response object from the Aeris weather observation query, containing the current weather conditions.